function ech_n_1() {
	$.ajax({
		type: 'get',
		url: "new_file.json", //请求数据的地址
		dataType: "json", //返回数据形式为json
		success: function(result) {
			var myChart = echarts.init(document.getElementById("ech_n_1"));
			var data_highway = [{
					value: 298,
					name: '高速公路'
				},
				{
					value: 12753,
					name: '等级公路'
				},
			];
			var data_car = [{
					value: 13.11,
					name: '高速公路'
				},
				{
					value: 135.19,
					name: '等级公路'
				},
			];
			option = {
				color: ["#18efe8", "#1469dd"],
				series: [{
						name: '访问来源',
						type: 'pie',
						center: ['50%', '25%'],
						startAngle: -40,
						radius: ['35%', '50%'],
						avoidLabelOverlap: false,
						label: {
							show: true,
							position: 'outside',
							fontSize: 24,
							formatter: '{b}' + '\n{c}公里'
						},
						labelLine: {
							show: false
						},
						data: data_highway
					},
					{
						name: '访问来源',
						type: 'pie',
						center: ['50%', '75%'],
						startAngle: -40,
						radius: ['35%', '50%'],
						avoidLabelOverlap: false,
						label: {
							show: true,
							position: 'outside',
							fontSize: 24,
							formatter: '{b}' + '\n{c}万辆'
						},
						labelLine: {
							show: false
						},
						data: data_car
					}
				]
			};

			if(option && typeof option === "object") {
				myChart.setOption(option, true);
			}
		},
	});

}

function ech_n_2() {
	$.ajax({
		type: 'get',
		url: "new_file.json", //请求数据的地址
		dataType: "json", //返回数据形式为json
		success: function(result) {
			var myChart = echarts.init(document.getElementById("ech_n_2"));
			var data = [{
					value: 13,
					name: '2A旅游区'
				},
				{
					value: 44,
					name: '3A旅游区'
				},
				{
					value: 13,
					name: '4A旅游区'
				},
				{
					value: 2,
					name: '5A旅游区'
				},
			];
			option = {
				color: ["#00ffe4", "#2fe6ed", "#2fc3ed", "#1469dd"],
				series: [{
					name: '访问来源',
					type: 'pie',
					startAngle: 40,
					radius: ['55%', '80%'],
					avoidLabelOverlap: false,
					label: {
						show: false,
					},
					data: data.sort(function(a, b) {
						return a.value - b.value
					})
				}]
			};
			if(option && typeof option === "object") {
				myChart.setOption(option, true);
			}
		},
	});

}

function ech_n_3() {
	$.ajax({
		type: 'get',
		url: "new_file.json", //请求数据的地址
		dataType: "json", //返回数据形式为json
		success: function(result) {	
			var myChart = echarts.init(document.getElementById("ech_n_3"));
				var data = [{
					value1_name: '蔬菜作物播种面积',
					value1: 116.48,
					value2_name: '粮食作物播种面积',
					value2: 98.99,
					total_name: '农作物总播种面积',
					total:215.47
			}, {
					value1_name: '禽蛋产量',
					value1: 2.78,
					value2_name: '猪肉产量',
					value2: 8.93,
					total_name: '全年肉类总产量',
					total:11.80
			}, {
					value1_name: '海水养殖产量',
					value1: 49.93,
					value2_name: '海洋捕捞产量',
					value2: 103.87,
					total_name: '全年水产品产量',
					total:163.32
			}];
			var radius = ['27%', '40%'];
			var h = ['20%%', '50%', '80%']
			var w = ['50%', '50%', '50%']
			option = {
				color: ["#18efe8", "#1469dd","#11308c"],
				series: []
			};
			for(var i = 0; i < data.length; i++) {
				option.series.push({
					type: 'pie',
					center: [h[i], w[i]],
					radius: radius,
					startAngle:45,
					hoverAnimation: false,
					label: {
						show: true,
						fontSize:13,
						color:"#fff",
						padding: [-30, 0,0,0],
						position: 'center',
						formatter: function(val) { //让series 中的文字进行换行
							var value = 1;
							var tit = "";
							switch(val.name){
								case '农作物总播种面积':
								value = data[0].total;
								tit = "千公顷";
								break;
								case '全年肉类总产量':
								value = data[1].total;
								tit = "万吨";
								break;
								case '全年水产品产量':
								value = data[2].total;
								tit = "万吨";
								break;
							}
							return val.name.split("-").join("\n")+"\n"+"{a|"+value+"}"+"{b|"+tit+"}" ;
						},
						rich:{
							a:{
						fontSize: 18,
    					padding: [10, 0, 10, 10],
						color:"#fff",
							},
							b:{
						fontSize: 10,
						color:"#fff",
							}
						}
					},
					x: '0%',
					data: [{
						name: data[i].value1_name,
						value: data[i].value1,
						label: {show:false}
					}, {
						name: data[i].value2_name,
						value: data[i].value2,
						label: {show:false}
					}, {
						name: data[i].total_name,
						value: data[i].total - data[i].value1 - data[i].value2,
					}]
				}
				);
			};

			if(option && typeof option === "object") {
				myChart.setOption(option, true);
			}
		},
	});

}

function ech_n_4() {
	$.ajax({
		type: 'get',
		url: "new_file.json", //请求数据的地址
		dataType: "json", //返回数据形式为json
		success: function(result) {
			var myChart = echarts.init(document.getElementById("ech_n_4"));
			var label = {
				normal: {
					show: true,
					color: "#fff",
					fontSize: 24,
					position: 'insideLeft',
					formatter: '{a|{c}} 亿元',
					rich: {
						a: {
							color: "#fff",
							fontSize: 40,
						}
					}
				}

			}
			var data = [279.81, 154.27, 30.04, 6.80, 4.58]
			var myColor = ["#e40177", "#fabd00", "#e6e636", "#8ac22d", "#2fbbec", ]
			option = {
				grid: {
					left: '16%',
					right: '0',
					top: '0',
					bottom: '10%',
				},
				xAxis: {
					type: 'value',
					axisLine: {
						show: false
					},
					axisLabel: {
						show: false
					},
					axisTick: {
						show: false
					},
					splitLine: {
						show: false
					},
				},
				yAxis: {
					type: 'category',
					axisLabel: {
						show: true,
						color: "#fff",
						fontSize: 22,
						margin: 30
					},
					axisLine: {
						show: false
					},
					axisTick: {
						show: false
					},
					splitLine: {
						show: false
					},
					inverse: true,
					data: ['渔业', '农业', '牧业', '林业', '服务业']
				},
				series: [{
					name: '2011年',
					type: 'bar',
					itemStyle: {
						normal: {
							barBorderRadius: [0, 10, 10, 0],
							color: function(params) {
								var num = myColor.length;
								return myColor[params.dataIndex % num]
							},
						}
					},
					label: label,
					data: data
				}]
			};
			if(option && typeof option === "object") {
				myChart.setOption(option, true);
			}
		},
	});

}


function ech_n_5() {
	$.ajax({
		type: 'get',
		url: "new_file.json", //请求数据的地址
		dataType: "json", //返回数据形式为json
		success: function(result) {
			var myChart = echarts.init(document.getElementById("ech_n_5"));
			var label = {
				normal: {
					show: true,
					fontSize: 47,
					position: 'top',
					formatter: '{c}',
				}

			}
			var data = [19, 286, 6]
			var myColor = ["#ffeb08", "#ff7800", "#0078ff"]
			option = {
				grid: {
					right: '5%',
					left: '0',
					top: '0',
				},
				xAxis: {
					type: 'category',
					axisLine: {
						show: false
					},
					axisLabel: {
						show: true,
						color: "#a8abb6",
						fontSize: 28,
						margin: 20
					},
					axisTick: {
						show: false
					},
					splitLine: {
						show: false
					},
					data: ['中国名牌', '浙江名牌', '地理标志保护']
				},
				yAxis: {
				    min: 1,
				    logBase:50,
					type: 'log',
					axisLabel: {
						show: false,
					},
					axisLine: {
						show: false
					},
					axisTick: {
						show: false
					},
					splitLine: {
						show: false
					},
				},
				series: [{
					name: '2011年',
					type: 'bar',
                    barWidth: '50%',
					itemStyle: {
						normal: {
							barBorderRadius: 10,
							color: function(params) {
								var num = myColor.length;
								return myColor[params.dataIndex % num]
							},
						}
					},
					label: label,
					data: data
				}]
			};
			if(option && typeof option === "object") {
				myChart.setOption(option, true);
			}
		},
	});

}

		function ech_n_6() {
	$.ajax({
		type: 'get',
		url: "new_file.json", //请求数据的地址
		dataType: "json", //返回数据形式为json
		success: function(result) {
			var myChart = echarts.init(document.getElementById("ech_n_6"));var data_fangzu = [
                {value:0, name:'未缴'},
                {value:0, name:'已缴'}
           ];
var data_shuifei = [
                {value:0, name:'未缴'},
                {value:0, name:'已缴'}
           ];
var data_dianfei = [
                {value:661, name:'未缴'},
                {value:103, name:'已缴'}
           ];
var data_wuye = [
                {value:0, name:'未缴'},
                {value:0, name:'已缴'}
           ];
var textStyle = {
    color:"#fff",
    fontSize:24
}
option = {
    color:["#18efe8", "#1469dd"],
    title: [{
        text: '房租缴纳情况(本月)',
        x: '25%',
        y: '3%',
        textStyle :textStyle,
        textAlign: 'center'
    },{
        text: '水费缴纳情况(本月)',
        x: '75%',
        y: '3%',
        textStyle :textStyle,
        textAlign: 'center'
    }, {
        text: '电费缴纳情况(本月)',
        x: '25%',
        y: '53%',
        textStyle :textStyle,
        textAlign: 'center'
    }, {
        text: '物业费缴纳情况（本年）',
        x: '75%',
        y: '53%',
        textStyle :textStyle,
        textAlign: 'center'
    }],
    series: [{
        type: 'pie',
            label: {show: false},
        radius: [0, '23%'],
        center: ['25%', '20%'],
        data: data_fangzu
    }, {
        type: 'pie',
            label: {show: false},
        radius: [0, '23%'],
        center: ['75%', '20%'],
        data:data_shuifei
    }, {
        type: 'pie',
            label: {show: false},
        radius: [0, '23%'],
        center: ['25%', '70%'],
        data:data_dianfei
    }, {
        type: 'pie',
            label: {show: false},
        radius: [0, '23%'],
        center: ['75%', '70%'],
        data:data_wuye
    }]
};

			if(option && typeof option === "object") {
				myChart.setOption(option, true);
			}
		},
	});

}
			
			function ech_n_7() {
	$.ajax({
		type: 'get',
		url: "new_file.json", //请求数据的地址
		dataType: "json", //返回数据形式为json
		success: function(result) {
			var myChart = echarts.init(document.getElementById("ech_n_7"));
			var data = [{
				name: "汇富A楼",
				zongshu: 15,
				chuzu:1
			}, {
				name: "汇富B楼",
				zongshu: 7,
				chuzu:2
			},{
				name: "汇富C楼",
				zongshu: 3,
				chuzu:0
			}, {
				name: "汇富D楼",
				zongshu: 9,
				chuzu:0
			}];
			var data_name = [];
			var data_zongshu = [];
			var data_chuzu = [];
			for(var i = 0; i < data.length; i++) {
				data_name.push(data[i].name);
				data_zongshu.push(data[i].zongshu);
				data_chuzu.push(data[i].chuzu);
			}
			option = {
			color:["#1469dd", "#2fe6ed"],
			 grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis: {
        type: 'value',
        max:18,
        interval:3,
					axisLabel: {
						show: true,
						color: "#fff",
						fontSize: 24,
					},
					axisLine: {show: false},
					axisTick: {show: false},
					splitLine: {show: false},
    },
    yAxis: {
					type: 'category',
					axisLabel: {
						show: true,
						color: "#fff",
						fontSize: 24,
						margin: 30
					},
					axisLine: {show: false},
					axisTick: {show: false},
					splitLine: {show: false},
					inverse: true,
					data: data_name
				},
    series: [
        {
            name: '房间总数',
            type: 'bar',
            data: data_zongshu
        },
        {
            name: '已租房间数',
            type: 'bar',
            data: data_chuzu
        }
    ]
};

			if(option && typeof option === "object") {
				myChart.setOption(option, true);
			}
		},
	});

}
			
function ech_n_8() {
	$.ajax({
		type: 'get',
		url: "new_file.json", //请求数据的地址
		dataType: "json", //返回数据形式为json
		success: function(result) {
			var myChart = echarts.init(document.getElementById("ech_n_8"));
		 var data_fangzu = [
                 {value:1, name:'正常'},
                 {value:0, name:'失联'},
                 {value:0, name:'未激活'},
                 {value:0, name:'告警'}
            ];
 var data_shuifei = [
                 {value:2, name:'正常'},
                 {value:0, name:'失联'},
                 {value:0, name:'未激活'},
                 {value:0, name:'告警'}
            ];
 var data_dianfei = [
                 {value:1, name:'正常'},
                 {value:0, name:'失联'},
                 {value:0, name:'未激活'},
                 {value:0, name:'告警'}
            ];
 var data_wuye = [
                 {value:1, name:'正常'},
                 {value:0, name:'失联'},
                 {value:0, name:'未激活'},
                 {value:0, name:'告警'}
            ];
 var textStyle = {
     color:"#fff",
     fontSize:24
 }
 var  radius=['19%', '28%'],
			option = {
     color:["#1469dd", "#8ac22d","#e6e636", "#e40177"],
     title: [{
         text: '智能井盖',
         subtext:'设备总数：1',
         x: '25%',
         textStyle :textStyle,
         subtextStyle :textStyle,
         textAlign: 'center'
     },{
         text: '智能烟感',
         subtext:'设备总数：2',
         x: '75%',
         textStyle :textStyle,
         subtextStyle :textStyle,
         textAlign: 'center'
     }, {
         text: '智能闷盖',
         subtext:'设备总数：1',
         x: '25%',
         y: '38%',
         textStyle :textStyle,
         subtextStyle :textStyle,
         textAlign: 'center'
     }, {
         text: '智能消防栓',
         subtext:'设备总数：1',
         x: '75%',
         y: '38%',
         textStyle :textStyle,
         subtextStyle :textStyle,
         textAlign: 'center'
     }],
     series: [{
         type: 'pie',
             label: {show: false},
         radius: radius,
         center: ['25%', '25%'],
         data: data_fangzu
     }, {
         type: 'pie',
             label: {show: false},
         radius: radius,
         center: ['75%', '25%'],
         data:data_shuifei
     }, {
         type: 'pie',
             label: {show: false},
         radius: radius,
         center: ['25%', '63%'],
         data:data_dianfei
     }, {
         type: 'pie',
             label: {show: false},
         radius: radius,
         center: ['75%', '63%'],
         data:data_wuye
     }]
 };

			if(option && typeof option === "object") {
				myChart.setOption(option, true);
			}
		},
	});

}

		function ech_n_9(){
				$.ajax({
			        type: 'get',
			        url: "new_file.json",//请求数据的地址
			        dataType: "json",        //返回数据形式为json
			        success: function (result) {	
			    var myChart = echarts.init(document.getElementById("ech_n_9"));
				var data_dongtai = [{
				name: "幼儿园",
				value: 1234,
				total:1600
			}, {
				name: "普通小学",
				value: 352,
				total:600
			},{
				name: "初中",
				value: 207,
				total:250
			}, {
				name: "高中",
				value: 70,
				total:100
			}, {
				name: "中等职业学校",
				value: 22,
				total:50
			}];
			var radius = [105, 120];
			var h = ['13%', '31.5%', '50%', '68.5%', '87%']
			var w = ['35%', '35%', '35%', '35%', '35%']
			var color = ['#e40177', '#209ad7', '#8ac22d', '#f9bc00', '#e6e636']
			var label_dongtai = [];
			for(var i = 0; i < data_dongtai.length; i++) {
				label_dongtai.push(data_dongtai[i].name);
			}
			
			option = {
				series: []
			};
			for(var i = 0; i < data_dongtai.length; i++) {
				option.series.push({
					type: 'pie',
					center: [h[i], w[i]],
					radius: radius,
					hoverAnimation: false,
					label: {
						show: true,
						fontSize:26,
						padding: [60, 0,0,0],
						position: 'center',
						formatter: function(val) { //让series 中的文字进行换行
							var value = 1;
							var tit = "";
							switch(val.name){
								case '幼儿园':
								value = val.value;
								tit = "所";
								break;
								case '普通小学':
								value = val.value;
								tit = "所";
								break;
								case '初中':
								value = val.value;
								tit = "所";
								break;
								case '高中':
								value = val.value;
								tit = "所";
								break;
								case '中等职业学校':
								value = val.value;
								tit = "所";
								break;
							}
							return "{a|"+value+"}"+"{b|"+tit+"}"+"\n"+ val.name.split("-").join("\n");
						},
						rich:{
							a:{
						fontSize: 63,
						fontWeight:'bold',
							},
							b:{
						fontSize: 26,
						fontWeight:'bold',
							}
						}
					},
					x: '0%',
					itemStyle: {
						normal: {
							color: color[i],
							
						}
					},
					data: [{
						name: data_dongtai[i].name,
						value: data_dongtai[i].value,
					}, {
						name: '',
						value: data_dongtai[i].total - data_dongtai[i].value,
						itemStyle: {
							normal: {
								label: {
									show: false
								},
								labelLine: {
									show: false
								},
								color: 'rgba(0,0,0,0)',
								borderColor: 'rgba(0,0,0,0)',
								borderWidth: 0
							}
						}
					}]
				}
				);
			};
			
			if (option && typeof option === "object") {
			    myChart.setOption(option, true);
			}
			        },
			    });
			
			}
		
			function ech_n_10() {
	$.ajax({
		type: 'get',
		url: "new_file.json", //请求数据的地址
		dataType: "json", //返回数据形式为json
		success: function(result) {
			var myChart = echarts.init(document.getElementById("ech_n_10"));
			var data = [{
				name: "特殊教育学校",
				zhaosheng: 998,
				zaixiao:1161
			}, {
				name: "全日制普通高校",
				zhaosheng: 10715,
				zaixiao:34728
			},{
				name: "成人高校",
				zhaosheng: 0,
				zaixiao:32070
			}];
			var data_name = [];
			var data_zhaosheng = [];
			var data_zaixiao = [];
			for(var i = 0; i < data.length; i++) {
				data_name.push(data[i].name);
				data_zhaosheng.push(data[i].zhaosheng);
				data_zaixiao.push(data[i].zaixiao);
			}
			var label = {
                normal: {
                    show: true,
                    color: "#fff",
					fontSize: 36,
					fontWeight: 'bold',
                    position: 'right'
                }
            };
			option = {
			color:["#1469dd", "#2fe6ed"],
			 grid: {
        left: '18%',
        right: '22%',
        bottom: '0%',
        top: '0%',
        containLabel: true
    },
    xAxis: {
        type: 'value',
					axisLabel: {show: false},
					axisLine: {show: false},
					axisTick: {show: false},
					splitLine: {show: false},
    },
    yAxis: {
					type: 'category',
					axisLabel: {show: false},
					axisLine: {show: false},
					axisTick: {show: false},
					splitLine: {show: false},
					inverse: true,
					data: data_name
				},
    series: [
        {
            name: '招生人数',
            type: 'bar',
            barWidth: '35%',
            barGap: '5%',
            label:label,
            data: data_zhaosheng
        },
        {
            name: '在校学生数',
            type: 'bar',
            barWidth: '35%',
            barGap: '5%',
            label:label,
            data: data_zaixiao
        }
    ]
};

			if(option && typeof option === "object") {
				myChart.setOption(option, true);
			}
		},
	});

}
